import request from '@/utils/request'

/**
 * 经费管理：
   预算申报列表（kjxm/expenditure/budgetDeclaration/list）
   我的预算申报（kjxm/expenditure/budgetDeclaration/myList）
   经费执行列表（kjxm/expenditure/fundExecution/list）
   我的经费执行（kjxm/expenditure/fundExecution/myList）
   经费回收列表（kjxm/expenditure/fundRecovery/list）
   我的经费回收（kjxm/expenditure/fundRecovery/myList）
   经费考核列表（kjxm/expenditure/fundExamine/list）
   我的经费考核（kjxm/expenditure/fundExamine/myList）

 */

const expenditure = {
  // 项目预算
  budgetDeclarationList(params){
    return request.get(`/kjxm/budgetDeclaration/list`,{params});
  },
  budgetDeclarationMyList(params){
    return request.get(`/kjxm/budgetDeclaration/myList`,{params});
  },
  addBudgetDeclaration(data) {
    return request.post(`/kjxm/budgetDeclaration/add`, data);
  },
  updateBudgetDeclaration(data) {
    return request.post(`/kjxm/budgetDeclaration/update`, data);
  },
  deleteBudgetDeclaration(id) {
    return request.post(`/kjxm/budgetDeclaration/delete/${id}`);
  },
  budgetDeclarationDetail(id) {
    return request.get(`/kjxm/budgetDeclaration/detail/${id}`);
  },
  // 经费执行
  fundExecutionList(params){
    return request.get(`/kjxm/fundExecution/list`,{params});
  },
  fundExecutionMyList(params){
    return request.get(`/kjxm/fundExecution/myList`,{params});
  },
  addFundExecution(data) {
    return request.post(`/kjxm/fundExecution/add`, data);
  },
  updateFundExecution(data) {
    return request.post(`/kjxm/fundExecution/update`, data);
  },
  deleteFundExecution(id) {
    return request.post(`/kjxm/fundExecution/delete/${id}`);
  },
  fundExecutionDetail(id) {
    return request.get(`/kjxm/fundExecution/detail/${id}`);
  },
  // 经费回收
  fundRecoveryList(params){
    return request.get(`/kjxm/fundRecovery/list`,{params});
  },
  fundRecoveryMyList(params){
    return request.get(`/kjxm/fundRecovery/myList`,{params});
  },
  addFundRecovery(data) {
    return request.post(`/kjxm/fundRecovery/add`, data);
  },
  updateFundRecovery(data) {
    return request.post(`/kjxm/fundRecovery/update`, data);
  },
  deleteFundRecovery(id) {
    return request.post(`/kjxm/fundRecovery/delete/${id}`);
  },
  fundRecoveryDetail(id) {
    return request.get(`/kjxm/fundRecovery/detail/${id}`);
  },
  // 经费考核
  fundExamineList(params){
    return request.get(`/kjxm/fundExamine/list`,{params});
  },
  fundExamineMyList(params){
    return request.get(`/kjxm/fundExamine/myList`,{params});
  },
  addFundExamine(data) {
    return request.post(`/kjxm/fundExamine/add`, data);
  },
  updateFundExamine(data) {
    return request.post(`/kjxm/fundExamine/update`, data);
  },
  deleteFundExamine(id) {
    return request.post(`/kjxm/fundExamine/delete/${id}`);
  },
  fundExamineDetail(id) {
    return request.get(`/kjxm/fundExamine/detail/${id}`);
  },
}

export default expenditure;
